<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- 添加视口元标签 -->
    <title>Login</title>
    <style>
        body {
            margin: 0;
            font-family: Arial, sans-serif; /* 改进字体 */
            background-color: #f4f4f4; /* 设置背景色 */
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh; /* 全屏高度 */
        }
        form {
            background: white;
            padding: 20px;
            border-radius: 5px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* 添加阴影效果 */
        }
        p {
            margin: 15px 0; /* 增加段落间距 */
        }
        input[type="text"], input[type="password"] {
            width: calc(100% - 22px); /* 输入框宽度适配 */
            padding: 10px; /* 增加填充 */
        }
        input[type="submit"] {
            background-color: #4CAF50; /* 设置按钮背景色 */
            color: white;
            padding: 14px 20px;
            margin: 8px 0;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            width: 100%;
        }
        input[type="submit"]:hover {
            background-color: #45a049;
        }
    </style>
</head>
<body>
    <h2>Login</h2>
    <form action="" method="post">
        {{ form.hidden_tag() }}
        <p>
            {{ form.username.label }}<br>
            {{ form.username(size=32) }}
        </p>
        <p>
            {{ form.password.label }}<br>
            {{ form.password(size=32) }}
        </p>
        <p>{{ form.submit() }}</p>
    </form>
</body>
</html>
